﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DIS_WEB_Client.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent2" runat="server">
<script type="text/javascript">
    function ValidateRegister() {
        var fullname = document.getElementsByName("fullname").item(0);
        if (fullname.value == "") {
            alert("Please input fullname");
            return false;
        }
        var phone = document.getElementsByName("phone").item(0);
        if (phone.value == "") {
            alert("Please input phone");
            return false;
        }
        var address = document.getElementsByName("address").item(0);
        if (address.value == "") {
            alert("Please input address");
            return false;
        }
        var email = document.getElementsByName("email").item(0);
        if (email.value == "") {
            alert("Please input email");
            return false;
        }
        return true;
    }
</script>

<script type="text/javascript">
	<% if (ViewData["UpdateAccountInfo"] != null){ %>
		alert('<%= ViewData["UpdateAccountInfo"] %>');
	<% } %>
</script>

<%
    HttpCookie SlmMemberCookie = new HttpCookie("SLMFMembers");
    SlmMemberCookie = HttpContext.Current.Request.Cookies["SLMFMembers"];
    string strUser = string.Empty;
    if (SlmMemberCookie != null && SlmMemberCookie.Value != "" &&
            SlmMemberCookie.Value != null)
    {
        strUser = SlmMemberCookie.Value.ToString();
    }
%>

<table width="560" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
        <td valign="top">
        <!-- MAIN -->

            <div class="page_title" style="width: 556px">
                <div class="text">
                    New Account
                </div>
            </div>

            <div style="margin-left: 10px; margin-right: 10px; text-align:left"><br>
		        The fields marked <b>*</b> must be filled in.<br>		
		        <br>
            </div>
            <% using (Html.BeginForm("Update", "Home", FormMethod.Post, new { onsubmit = "return ValidateRegister();" }))
               { %>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" style="text-align:left">
			    <tbody>
			        <tr bgcolor="#f6fbfd">
				        <td valign="top"><div style="margin: 5px 10px;"><b>Full Name *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.TextBox("fullname", Model.CustomerModel.GetModel.LstObjModel[0].Name, new { @style = "width: 300px;" })%>
                            </div>
                        </td>
			        </tr>
			        <tr>
				        <td valign="top"><div style="margin: 5px 10px;"><b>Phone *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.TextBox("phone", Model.CustomerModel.GetModel.LstObjModel[0].Phone, new { @style = "width: 300px;" })%>
                            </div>
                        </td>
			        </tr>
			        <tr bgcolor="#f6fbfd">
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Address *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.TextBox("address", Model.CustomerModel.GetModel.LstObjModel[0].Address, new { @style = "width: 300px;" })%>
                            </div>
                        </td>
			        </tr>
			        <tr>
				        <td valign="top"><div style="margin: 5px 5px 5px 10px;"><b>Email *</b></div></td>
				        <td valign="top">
                            <div style="margin: 5px 10px 5px 5px;">
                                <%= Html.TextBox("email", Model.CustomerModel.GetModel.LstObjModel[0].Email, new { @style = "width: 300px;" })%>
                            </div>
                        </td>
			        </tr> 
                    <tr>
						<td height="20" style="width: 130px">
						</td>
						<td height="20">
							<div style="margin: 5px 10px 5px 5px;">
								<br/>
                                <%= Html.Hidden("username", strUser, new { @style = "width: 300px;" })%>
                                <input type="submit" name="sbt" id="sbt" value="Update" style="background-image: url(../../../Content/Images/bgbutton.jpg); color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid; height: 30px; cursor:pointer; cursor:pointer;" />
								<p>
								</p>
							</div>
						</td>
					</tr>
                </tbody>
			    <!-- MAIN END -->
            </table>
        <% } %>
	</td></tr>
	</tbody>
</table>
</asp:Content>
